import { Service } from "~/core/service";
import { NetService } from "~/util/net.service";
import { Inject, Debounce } from "~/core/decorator";
import { serviceOrder } from "~/config/server";

export class OrderService extends Service {

  @Inject(NetService)
  private netService: NetService;

  /**
    * 查询所有未删除的产品
    */
  findAllPublicProductList(data, page) {
    return this.netService.send({
      server: serviceOrder.orderController.findOrderListByPage,
      data,
      page
    })
  }

  /**
    * 创建订单
    */
   createOrder(data) {
    return this.netService.send({
      server: serviceOrder.orderController.createOrder,
      data
    })
  }
}